﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FortuneHeaven.Web.Common;
using FortuneHeavenBAL;

namespace FortuneHeaven.Web.Pages.News
{
    public partial class NewsDetail : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SetPageHeader(FortuneHeavenCommon.Enum.MainPageTabType.news);
            if (!IsPostBack)
            {
                string id = Request["newsid"];
                if (!string.IsNullOrEmpty(id))
                {
                    id = id.Trim();
                    NewsBO bo = new NewsBO();
                    FortuneHeavenCommon.DataMap.News news = bo.GetInfo(id);
                    ltTitle.Text = news.Title;
                    ltTime.Text = news.Time.ToString("yyyy.MM.dd");
                    ltContent.Text = news.Content;
                }
                else
                {
                    TransferErrorPage();
                }
            }
        }
    }
}